<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 200px;
            height: 100px;
            border: 2px solid #000;
            position: absolute;
            overflow: hidden; 
        }
        .box1{
            width: 200px;
            height: 100px;
            background-color: red;
            position: relative;
            animation: fly 3s infinite running;
        }
        .box2{
            width: 200px;
            height: 100px;
            background-color: green;
            position: relative;
            left: 200px;
            top: -100px;
            animation: fly 3s infinite running;
        }
        .box3{
            width: 200px;
            height: 100px;
            background-color: blue;
            position: relative;
            left:400px;
            top: -200px;
            animation: fly 3s infinite running;
        }
        @keyframes fly{
        20%{
            transform: translateX(-200px);
        }
        50%{
            transform: translateX(-400px);
        }
        100%{
            transform: translateX(0px);
        }
        }

    </style>
</head>
<body>
    <div class="box">
        <div class="box1"></div>
        <div class="box2"></div>
        <div class="box3"></div>
    </div>
</body>
</html>